package com.wyw.hemerocallis.feign;

import com.wyw.hemerocallis.vo.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 通过Sentinel对OpenFeign
 *
 * @author Mr Wu    yewen.wu.china@gmail.com
 * <p>
 * Update History:
 * Author        Time            Content
 */
@FeignClient(
        value = "wyw",   //当然此服务不存在，可以掩饰熔断降级
        fallback = SentinelFeignClientFallback.class
)
public interface SentinelFeignClient {

    @RequestMapping(value = "test", method = RequestMethod.GET)
    CommonResponse<String> getResultByFeign(@RequestParam String code);

}
